import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

import One from '../views/One.vue'
import Two from '../views/Two.vue'
import Three from '../views/Three.vue'
import Four from '../views/Four.vue'
import Five from '../views/Five.vue'
import Six from '../views/Six.vue'
import Seven from '../views/Seven.vue'
import Eight from '../views/Eight.vue'
import Denglu from '../views/Denglu.vue'
import Zhuce from '../views/Zhuce.vue'
import Nine from '../views/Nine.vue'
import QQ from '../views/QQ.vue'
const routes = [
  {
    path:'/One',
    name:'One',
    component:One,
    // component: () => import('../views/One')
  },
  {
    path:'/Two',
    name:'Two',
    component:Two
  },
  {
    path:'/Three',
    name:'Three',
    component:Three
  },
  {
    path:'/Four',
    name:'Four',
    component:Four
  },
  {
    path:'/Five',
    name:'Five',
    component:Five
  },
  {
    path:'/Six',
    name:'Six',
    component:Six
  },
  {
    path:'/Seven',
    name:'Seven',
    component:Seven
  },
  {
    path:'/Eight',
    name:'Eight',
    component:Eight
  },
  {
    path:'/Denglu',
    name:'Denglu',
    component:Denglu
  },
  {
    path:'/Zhuce',
    name:'Zhuce',
    component:Zhuce
  },
  {
    path:'/Nine',
    name:'Nine',
    component:Nine
  },
  {
    path:'/QQ',
    name:'QQ',
    component:QQ
  },
  // 重定向
  {
    path:"/",
    // 重新定位方向
    redirect:"/One"
  }
]
const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
